import { addHour } from "./addHour"

export function addDay(num: string | number = 1, date: Date = new Date()) {
  num = Number(num)
  if (num > parseInt(num as any as string)) {
    return addHour(num * 24, date)
  }
  date.setDate(date.getDate() + num)
  return date
}